using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using DataGearLib.Framework;

namespace DataGearLib.SqlServerGenerator
{
    public class Connector:IDbConnector
    {
        private bool _connected = false;

        #region IDbConnector Members

        public void Connect(string connectionString)
        {
            SqlConnection connection = new SqlConnection(connectionString);

            try
            {
                connection.Open();
                _connected = true;
            }
            catch (Exception ex)
            {
                _connected = false;
            }
        }

        public List<EntityBase> ExecuteSelectCommand(ITableFields fields)
        {
            List<EntityBase> list = new List<EntityBase>();
            return list;
        }

        public void Close()
        {
            
        }

        public bool IsConnected()
        {
            return _connected;
        }

        #endregion
    }
}
